import { Image } from 'react-native';
import { Config } from '../../config';

const parseAssest = (url) => {
  // return Config.AssetsRoot + url;
  return 'http://m.bobol.com/staticres/' + url;
};

export const imagesDefault = {
  default: require('./default.jpg')
};

export const imagesUser = {
  album: require('./user/album.png')
};


export const imagesLoad = {

};

export const imagesWelcome = {
  slide1: { uri: parseAssest('wizard/slide1.png') },
  slide2: { uri: parseAssest('wizard/slide2.png') },
  slide3: { uri: parseAssest('wizard/slide3.png') },
};

export const imagesCache = function () {

  return new Promise((resolve) => {

    Object.keys(imagesWelcome)
      .map(
      (img) => {
        // return Image.prefetch(welcomeAssets[img].uri);
      });
    resolve(true);
  });

};
